<h1>Listing photos</h1>

<table>
  <tr>
    <th>Tags</th>
    <th>Name</th>
    <th>Photoalbum</th>
    <th>User</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @photos.each do |photo| %>
  <tr>
    <td><%= photo.tags %></td>
    <td><%= photo.name %></td>
    <td><%= photo.photoalbum_id %></td>
    <td><%= photo.user_id %></td>
    <td><%= link_to 'Show', photo %></td>
    <td><%= link_to 'Edit', edit_photo_path(photo) %></td>
    <td><%= link_to 'Destroy', photo, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Photo', new_photo_path %>
